﻿<Window x:Class="StandaloneDesigner.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:designer="clr-namespace:ICSharpCode.WpfDesign.Designer;assembly=ICSharpCode.WpfDesign.Designer"
        xmlns:my="clr-namespace:StandaloneDesigner"
        Title="StandaloneDesigner" Height="500" Width="700"
>
	<DockPanel>
		<ToolBar DockPanel.Dock="Top" Name="toolBar">
			<Button Command="Undo"><Image Source="Images/Undo.png" Stretch="None"/></Button>
			<Button Command="Redo"><Image Source="Images/Redo.png" Stretch="None"/></Button>
			<Button Command="Delete"><Image Source="Images/Delete.png" Stretch="None"/></Button>
		</ToolBar>
		<Grid>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*"/>
				<ColumnDefinition Width="225"/>
			</Grid.ColumnDefinitions>
			<TabControl TabStripPlacement="Bottom" Name="tabControl" SelectionChanged="tabControlSelectionChanged" Grid.Column="0">
				<TabItem Header="Code">
					<TextBox Name="CodeTextBox" AcceptsReturn="True"
					         VerticalScrollBarVisibility="Auto"
					         HorizontalScrollBarVisibility="Auto"
					         xml:space="preserve"><![CDATA[
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="WindowTitle"
        BorderThickness="10" Width="400" Height="300">
	<StackPanel>
		<Canvas Height="50">
			<Button>CB</Button>
		</Canvas>
		<TabControl MinHeight="150">
			<TabItem Header="StackPanel"><StackPanel><Button>a</Button></StackPanel> </TabItem>
			<TabItem Header="Button"><Button>button on page 2</Button></TabItem>
			<TabItem Header="Canvas"><Canvas/></TabItem>
			<TabItem Header="Grid"><Grid/></TabItem>
			<TabItem Header="DockPanel"><DockPanel/></TabItem>
		</TabControl>
	</StackPanel>
</Window>
        ]]></TextBox>
				</TabItem>
				<TabItem Header="Design" Name="designTab">
					<designer:DesignSurface
						Name="designSurface">
					</designer:DesignSurface>
				</TabItem>
			</TabControl>
			<GridSplitter HorizontalAlignment="Left" Width="4" VerticalAlignment="Stretch" Grid.Column="1"/>
			<Grid Grid.Column="1" Margin="4 0 0 0">
				<Grid.RowDefinitions>
					<RowDefinition Height="100"/>
					<RowDefinition Height="*"/>
				</Grid.RowDefinitions>
				<my:Toolbox x:Name="toolbox"/>
				<!--<Button Click="TestButtonClick">TestButton</Button>-->
				<GridSplitter HorizontalAlignment="Stretch" Height="4" VerticalAlignment="Top" Grid.Row="1"/>
				<designer:PropertyEditor Name="propertyEditor" Grid.Row="1"  Margin="0 4 0 0" FontSize="8.25pt"/>
			</Grid>
		</Grid>
	</DockPanel>
</Window>
